package org.nfIt;

import org.nfIt.dao.BookDao;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * ClossName:App
 * Pakage:org.nfIt
 * Description
 *
 * @Author L
 * @Create 2024/5/3 0:07
 * @Version 2023.1.3
 */
public class App {
    public static void main(String[] args) {

        ApplicationContext context = new ClassPathXmlApplicationContext("applicationContext.xml");

        //方式一：使用bean名称获取
        BookDao booDao = (BookDao) context.getBean("BooDao");

        booDao.say();
    }
}
